<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/19/019
 * Time: 17:00
 */

namespace Gate\controller;
use Workerman\Worker;
use GatewayWorker\BusinessWorker;
class TpBusinessController
{
    public $objBusiness;
    public function __construct()
    {
        // bussinessWorker 进程
        $this->objBusiness = new BusinessWorker();
        // worker名称
        $this->objBusiness->name = 'ChatBusinessWorker';
        // bussinessWorker进程数量
        $this->objBusiness->count = 1;
        // 服务注册地址
        $this->objBusiness->registerAddress = '127.0.0.1:1236';
        $this->objBusiness->eventHandler= '\Gate\Controller\EventsController';
        Worker::runAll();
    }

}